-
Notifications
You must be signed in to change notification settings - Fork 284
Conversation
74c4f5f
to
a1c0ca4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the remark about using set instead of list, I would suggest unit-testing this change somehow.
636c455
to
b2915b6
Compare
Rebased to develop now #4122 is solved |
@Wiezzel thanks for the review! Changed list to set and extended the tests, please check again :) |
tests/golem/task/test_taskkeeper.py
Outdated
@@ -276,6 +276,7 @@ def test_task_limit(frozen_time, self): # pylint: disable=no-self-argument | |||
self.assertIn(tb_id, tk.task_headers) | |||
|
|||
def test_check_max_tasks_per_owner(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test func got really long. Is it possible to split it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine
Codecov Report
@@ Coverage Diff @@
## develop #4123 +/- ##
===========================================
+ Coverage 88.79% 88.79% +<.01%
===========================================
Files 215 215
Lines 18675 18694 +19
===========================================
+ Hits 16583 16600 +17
- Misses 2092 2094 +2 |
- Remove running tasks before counting
…ved log when removing tasks from one owner.
b979e5f
to
fbe82fe
Compare
Duplicate of #4159 |
My golem node got stuck on a subtask:
When investigating i think the header was already deleted by the
check_max_tasks_per_owner()
cleanup, while the task was computing:This PR solves it 2x:
task_computer
, no longer return on error but let it clean up like other failures.task_keeper
of what tasks are running, so they are not removed during cleanup.Blocked by: #4122 ( lint errors )